package easy;

/**
 * 3151相邻奇偶相反
 */
public class test18 {
    public static void main(String[] args) {
        test18 test18 = new test18();
        System.out.println(test18.isArraySpecial(new int[]{5,2,3,3}));
    }

    public boolean isArraySpecial(int[] nums) {
        for (int i = 1; i < nums.length; i++) {
            if (nums[i - 1] % 2 == nums[i] % 2) {
                return false;
            }
        }
        return true;
    }
}
